<form class="pure-form pure-form-aligned" method="post" action="<?php echo URL; ?>myItems/submit_step1/" >
    <fieldset>
        <legend>
            Step 1: Basic details
        </legend>
        <div class="pure-control-group">
            <label for="category">Category</label>
            <select id="category" name="categoryId" class="pure-input-1-2"></select>  
        </div>
        
        <div class="pure-control-group">
            <label for="name">Name</label>
            <input type="text" name="name" class="pure-input-1-2" />
        </div>
        
        <div class="pure-control-group">
            <label for="price">Price</label>
            <input type="number" name="price" min="0" class="pure-input-1-2" />
        </div>
        
        <div class="pure-control-group">
            <label for="overview">Overview</label>
            <textarea name="overview" class="pure-input-1-2" rows="4"></textarea>
        </div>
        
        <div class="pure-controls">
            <button type="submit" class="pure-button pure-button-success">
                Continue
            </button>
        </div>
        </fieldset>
    </form>
     

<script>
    $(document).ready(function() {
        var category = <?php echo $this->categories?>;
        var str = "";
        
        for ( var i = 0; i < category.length; i++)
            str += '<option value="'+category[i].id+'">'+category[i].name+'</option>';
       
        $('#category').append(str);
    });

</script>